
<?php if($this->Session->check("Username")) {
    header('location:admin');
}?>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
     <script type="text/javascript">
        $(document).ready(function() {
            $('form').hide();
            $('a').click(function() {
               $(this).parent('div').prev('form').slideToggle('normal');
               $(this).toggleClass('active');
               return false;
            });
        });
     </script>
<?php
echo $this->Html->css("style"); //load file CSS riêng (app/webroot/css/style.css
?>
    <div id="wrapper">
        <?php if(!empty($errors)) {
            echo "<ul>";
            foreach($errors as $error) {
                echo "<li>{$error}</li>";
            }
            echo "</ul>";
        }?>
        
        <?php 
		$message=$this->requestAction(array("controller"=>"users","action"=>"logout2")); 
		if(isset($message)) echo $message;?>
        <form action="" method="post">
            <p>
                <label for="username">Username</label>
                <input type="text" name="username" />
            </p>
            
            <p>
                 <label for="password">Password</label>
                <input type="password" name="pword" />
            </p>
            
            <p>
                <input type="submit" name="submit" value="Go" />
            </p>
        </form>
        <div class='login'>
            <a href="#">Login</a>
        </div>
    </div>